package com.qujia.common.core.domain;

import com.github.pagehelper.PageInfo;
import com.github.pagehelper.PageSerializable;
import lombok.Data;
import org.apache.poi.ss.formula.functions.T;

import java.util.List;


@Data
public class Page  {


    //当前页
    private int pageNum;
    //每页的数量
    private int pageSize;
    //当前页的数量
    private int size;

    //总页数
    private int pages;

    //数据
    private List list;

    public static Page PageInfo(PageInfo pageInfo) {
        Page page = new Page();
        page.setPageNum(pageInfo.getPageNum());
        page.setPageSize(pageInfo.getPageSize());
        page.setSize(pageInfo.getSize());
        page.setPages(pageInfo.getPages());
        page.setList(pageInfo.getList());
        return page;
    }
}